interface eventData {
    type: string,
    pyData: any
}
type eventCallback = (actor: py.Actor, data: eventData) => void;


const emptyFun = function () {

}

export class y3Event {
    static eventId = 10000
    static nextId(this:void,) {
        y3Event.eventId = y3Event.eventId + 1
        return y3Event.eventId
    }
    static registerEvent(this:void,eventName: string, callback: eventCallback) {
        let pyTrigger = new_global_trigger(
            y3Event.nextId(),
            eventName,
            eventName,
            true
        )
        pyTrigger.on_event = (trigger, event, actor, data) => {
            callback(actor, {
                type: event,
                pyData: data
            })
        }
    }
}


